Skip to content

feat: CrewAI incident response example with KD6 memory backend - #6

Closed
devigned wants to merge 1 commit into
mainfrom
examples/crewai-memory
Closed

feat: CrewAI incident response example with KD6 memory backend#6
devigned wants to merge 1 commit into
mainfrom
examples/crewai-memory

Conversation

@devigned

@devigned devigned commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

CrewAI multi-agent example using KD6 as the persistent memory backend via the StorageBackend protocol.

What's Included

Kd6StorageBackend (src/kd6_backend.py)

Full implementation of CrewAI's StorageBackend protocol:

  • Translates CrewAI's path-based scopes (/org/team/agent) to KD6's structured MemoryScope
  • Uses upsert_key for idempotent saves with CrewAI record IDs
  • Preserves CrewAI metadata in a content envelope (content.crewai_metadata)
  • Exposes graph helpers (create_edge, traverse_graph) beyond the protocol
  • Implements all 11 sync + 3 async StorageBackend methods

Incident Response Simulation (src/main.py)

4-agent crew investigating a production incident at fictional "ShopStream":

  • Incident Commander — triage and coordination
  • Platform Engineer — infrastructure investigation
  • Backend Developer — root cause analysis
  • Communications Lead — postmortem documentation

GitHub Models Integration

Both LLM and embeddings use GitHub Models (GITHUB_TOKEN):

  • Chat: openai/gpt-4o-mini via https://models.github.ai/inference
  • Embeddings: openai/text-embedding-3-small via same endpoint

Smoke Test (src/smoke_test.py)

Non-LLM connectivity test validating all CRUD operations against a running KD6 server.

KD6 Features Demonstrated

  • Memory layers (semantic, episodic, working)
  • Scoped visibility with path-to-struct mapping
  • Upsert-based idempotent saves
  • Knowledge graph edges (via helper methods)
  • Cross-session persistence
  • Tenant isolation

@devigned
devigned force-pushed the examples/crewai-memory branch 7 times, most recently from b89cb67 to e80bc24 Compare June 3, 2026 21:50
Add examples/crewai-memory/ demonstrating CrewAI multi-agent crews using
KD6 as a persistent, layered memory backend via the StorageBackend protocol.

Components:
- Kd6StorageBackend: full StorageBackend protocol adapter translating
  CrewAI's path-based scopes to KD6's structured MemoryScope hierarchy,
  with upsert-based idempotent saves and metadata envelope preservation
- Incident response simulation: 4-agent crew (Incident Commander,
  Platform Engineer, Backend Developer, Communications Lead) investigating
  a production checkout service failure
- Smoke test: non-LLM connectivity test validating all CRUD operations
- GitHub Models integration: both LLM inference and embeddings via
  GITHUB_TOKEN with openai/gpt-4o-mini and text-embedding-3-small

Also adds Python-specific entries to .gitignore (__pycache__, .venv, .env).

Signed-off-by: David Justice <david@justice.dev>
@devigned
devigned force-pushed the examples/crewai-memory branch from e80bc24 to db6c6e5 Compare June 3, 2026 21:51
@devigned

devigned commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

Closing — will reopen once fully validated locally.

@devigned devigned closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant